﻿<!DOCTYPE>
<html>

<head>
  <meta http-equiv="X-UA-Compatible" content="IE=EDGE;IE=11;IE=8,chrome=1" />
  <title>排产下发回收页面</title>
  <link href="/InSiteWebApplication/Content/Easyui/themes/metro/easyui.css" rel="stylesheet" />
  <link href="/InSiteWebApplication/Content/Easyui/custom-easyui.css" rel="stylesheet" />
  <link href="/InSiteWebApplication/Content/Easyui/themes/icon.css" rel="stylesheet" />
  <style type="text/css">

  </style>
</head>

<body>
  <div id="mainDiv" style="margin:0px 1px 0px 0px">
    <div class="panelSection">
      <div class="easyui-panel " title="查询区域" style="padding: 3px;width: 100%"
        data-options="closable:false,collapsible:true,minimizable:false,maximizable:false">
        <div style="margin: 3px 0px 3px 3px">
          <div style="float: left">
            <div class="divLabel" style="margin-bottom: 5px">
              订单号：</div>
            <input id="txtOrderNum" class="easyui-textbox" style="width: 120px; height: 20px" />
          </div>
          <div style="float: left; margin-left: 10px">
            <div class="divLabel" style="margin-bottom: 5px">
              件号：</div>
            <input id="txtProductNum" class="easyui-textbox" style="width: 120px; height: 20px" />
          </div>
          <div style="float: left; margin-left: 10px">
            <div class="divLabel" style="margin-bottom: 5px">
              批次号：</div>
            <input id="txtContainerNum" class="easyui-textbox" style="width: 120px; height: 20px" />
          </div>
          <div style="float: left; margin-left: 10px">
            <div class="divLabel" style="margin-bottom: 5px">
              工序号：</div>
            <input id="txtSpecNo" class="easyui-textbox" style="width: 120px; height: 20px" />
          </div>
          <div style="float: left; margin-left: 10px">
            <div class="divLabel" style="margin-bottom: 5px">
              排产开始时间：</div>
            <input id="txtPlanStartTime1" class="easyui-datebox" style="width: 120px; height: 20px"
              data-options="editable:false" />
            -
            <input id="txtPlanStartTime2" class="easyui-datebox" style="width: 120px; height: 20px"
              data-options="editable:false" />
          </div>
          <div style="float: left; margin-left: 10px">
            <div class="divLabel" style="margin-bottom: 5px">
              排产结束时间：</div>
            <input id="txtPlanEndTime1" class="easyui-datebox" style="width: 120px; height: 20px"
              data-options="editable:false" />
            -
            <input id="txtPlanEndTime2" class="easyui-datebox" style="width: 120px; height: 20px"
              data-options="editable:false" />
          </div>
          <div style="float: left; margin-left: 10px">
            <div class="divLabel" style="margin-bottom: 5px">
              设备编码：</div>
            <input id="txtResourceCode" class="easyui-textbox" style="width: 120px; height: 20px" />
          </div>
          <div style="clear: both">
          </div>
        </div>
        <div style="margin: 3px 0px 3px 3px">
          <div style="float: left;">
            <div class="divLabel" style="margin-bottom: 5px">
              工区：</div>
            <select style='width: 120px; height: 20px' id='selWorkCenter' data-options='editable:false,panelHeight:80'
              class='easyui-combobox'>
            </select>
          </div>
          <div style="float: left; margin-left: 10px">
            <div class="divLabel" style="margin-bottom: 5px">
              班组：</div>
            <select style='width: 120px; height: 20px' id='selTeam' data-options='editable:false,panelHeight:80'
              class='easyui-combobox'>
            </select>
          </div>

          <div style="float: left; margin-left: 10px">
            <div class="divLabel" style="margin-bottom: 5px">
              件号主制单元：</div>
            <select style='width: 120px; height: 20px' id='ddlProductTeam' data-options='editable:false,panelHeight:80'
              class='easyui-combobox'>
            </select>
          </div>

          <div style="float: left; margin-left: 10px">
            <div class="divLabel" style="margin-bottom: 5px">
              排产策略：</div>
            <select style='width: 80px; height: 20px' id='selApsType' data-options='editable:false,panelHeight:150'
              class='easyui-combobox'>
              <option value="" selected>全部</option>
              <option value="1">正排</option>
              <option value="2">倒排</option>
              <option value="3">瓶颈排产</option>
            </select>
          </div>
          <div style="float: left; margin-left: 10px">
            <div class="divLabel" style="margin-bottom: 5px">
              下发状态：</div>
            <input id="selStatus" class="easyui-combobox"  style='width: 120px; height: 20px' data-options='editable:false,panelHeight:130'/>
            <!--<select style='width: 80px; height: 20px' id='selStatus' data-options='editable:false,panelHeight:100'
              class='easyui-combobox'>
              <option value="0">未下发</option>
              <option value="1" selected>已下发</option>
            </select>-->
          </div>
          <div style="float: left; margin-left: 10px">
            <div class="divLabel" style="margin-bottom: 5px">
              是否产线工序：</div>
            <select style='width: 80px; height: 20px' id='selState' data-options='editable:false,panelHeight:100'
              class='easyui-combobox'>
              <option value="0">否</option>
              <option value="1">是</option>
              <option value="" selected>全部</option>
            </select>
          </div>
          <div style="float: left; margin-left: 10px">
            <button id="btnSearch" class="easyui-linkbutton" data-options="" style="margin-top: 16px;
                            width: 80px;">
              查询</button>
            <button id="btnReset" class="easyui-linkbutton" data-options="" style="margin-top: 16px;
                            width: 50px;">
              重置</button>
          </div>
        </div>
      </div>
    </div>
    <div class="panelSection">
      <div class="easyui-panel " title="查询结果" style="padding: 3px;width: 100%"
        data-options="closable:false,collapsible:true,minimizable:false,maximizable:false">
        <div id="dvApsPlanInfo" class="dvgrid-cellwarp" style="background: #fff; margin: 3px 0px 3px 3px">
          <div style="width: 99%">
            <table id="gdApsPlanInfo" class="easyui-datagrid" style="width: 100%; height: 500px;"
              data-options="fitColumns:true,rownumbers:true">
            </table>
            <div id="pp" style="float: right" class="easyui-pagination" data-options="
                    layout:['first','prev','next','last','manual','info'],             
                    total: 0,
                    showPageList: false,
                    showPageInfo: false,
                    showRefresh: false,
                    afterPageText:'共&nbsp{pages}&nbsp页',
                    buttons:[{
                            iconCls:'',
                            text:'Go',
                            group:'paging-tail-btns',
                            id:'pageGo'
                    }]  
                ">
            </div>
          </div>
          <div style="clear: both">
          </div>
        </div>
      </div>
    </div>
    <div class="panelSection">
      <div class="easyui-panel " title="按钮区域" style="padding: 3px;width: 100%"
        data-options="closable:false,collapsible:true,minimizable:false,maximizable:false">
        <div style="margin: 3px 0px 3px 3px">
          <div id="divSend" style="float: left">
            <button id="btnSend" class="easyui-linkbutton" type="button" style="width: 100px;
                            height: 26px">
              下发派工</button>
          </div>
          <div id="divReCall" style="float: left">
            <button id="btnReCall" class="easyui-linkbutton" type="button" style="width: 100px;
                            height: 26px">
              收回</button>
          </div>
          <div id="divDele" style="float: left; margin-left: 20px">
            <button id="btnDele" class="easyui-linkbutton" type="button" style="width: 80px;
                            height: 26px">
              删除</button>
          </div>
          <div id="divSendHand" style="float: left; margin-left: 20px; display:none">
            <button id="btnSendHand" class="easyui-linkbutton" type="button" style="width: 200px;height: 26px">
              发布到工序排产完成情况看板
            </button>
          </div>
          <div id="divEditResult" style="float: left; margin-left: 20px">
            <button id="btnEditApsResult" class="easyui-linkbutton" type="button" style="width: 150px;
                            height: 26px">
              排产结果修改</button>
          </div>
          <div id="divBatchEditResult" style="float: left; margin-left: 20px">
            <button id="btnBatchEditApsResult" class="easyui-linkbutton" type="button" style="width: 160px;
                            height: 26px">
              排产结果批量修改</button>
          </div>

          <div id="divSendDispatchAndDashboard" style="float: left; margin-left: 20px">
            <button id="btnSendDispatchAndDashboard" class="easyui-linkbutton" type="button"
              style="width: 160px;height: 26px">
              下发派工&发布到看板
            </button>
          </div>
          <div id="divAgreeSendDown" style="float: left; margin-left: 20px">
              <button id="btnAgreeSendDown" class="easyui-linkbutton" type="button" style="width: 160px; 
                            height: 26px">
                            同意</button>
            </div>
          <div id="divAgreeReCall" style="float: left; margin-left: 20px">
              <button id="btnAgreeReCall" class="easyui-linkbutton" type="button" style="width: 160px; 
                            height: 26px">
                            同意</button>
            </div>
          <div id="divRefuseSendDown" style="float: left; margin-left: 20px">
                        <button id="Button2" class="easyui-linkbutton" type="button" style="width: 160px; 
                            height: 26px" onclick="page.refuseSendDown()">
                            拒绝</button>
                    </div>
        <div id="divReason" style="float: left; margin-left: 20px">
            <input class="easyui-textbox"  style="width:600px" id="inputReason" data-options="label:'审批意见:',multiline:true"/>
        </div>
          <!-- <div id="divSendDown" style="float: left; margin-left: 20px">
                        <button id="btnSendDown" class="easyui-linkbutton" type="button" style="width: 160px; 
                            height: 26px" onclick="page.sendDownOrderTaskToFms()">
                            下发产线</button>
                    </div>
                    <div id="divSendDownBack" style="float: left; margin-left: 20px">
                        <button id="btnSendDownBack" class="easyui-linkbutton" type="button" style="width: 160px; 
                            height: 26px" onclick="page.sendDownOrderTaskToFmsBack(4)">
                            下发撤销</button>
                    </div>
                     <div id="divSendDownBack1" style="float: left; margin-left: 20px">
                        <button id="Button1" class="easyui-linkbutton" type="button" style="width: 160px; 
                            height: 26px" onclick="page.sendDownOrderTaskToFmsBack(5)">
                            下发报废</button>
                    </div>-->
        </div>
      </div>
    </div>
    <div id="statusMessage" style="font-size: 14px; height: 40px">
    </div>
  </div>
  <div id="dg" title="编辑排产结果信息" style="width: 750px; height: 310px; display: none;
        top: 300px" data-options="iconCls:'icon-save',resizable:true">
    <form id="ff">
      <div style="margin: 3px 0 0 3px">
        <div style="float: left">
          <div style="float: left">
            <div class="divLabel" style="margin-bottom: 5px;">
              工区：</div>
            <select id="ddlWorkcenter" name="workcenterId" class="easyui-combobox" data-options="width:170,height:20 "
              required="required">
            </select>
          </div>
          <div style="float: left; margin-left: 10px">
            <div class="divLabel" style="margin-bottom: 5px;">
              班组：</div>
            <select id="ddlTeam" name="teamId" class="easyui-combobox"
              data-options="width:170,height:20, panelHeight:'auto' " required="required">
            </select>
          </div>
          <div style="clear: both">
          </div>
          <div style="float: left; margin-left: 0px; margin-top: 5px">
            <div class="divLabel" style="margin-bottom: 5px">
              排产开始日期</div>
            <input id="txtStartDate" name="startDate" type="text" class="easyui-datetimebox"
              style="height: 20px; width: 170px"  data-options="editable:false" />
          </div>
          <div style="float: left; margin-left: 10px; margin-top: 5px">
            <div class="divLabel" style="margin-bottom: 5px">
              排产结束日期</div>
            <input id="txtEndDate" name="endDate" type="text" class="easyui-datetimebox" style="height: 20px;
                        width: 170px"  data-options="editable:false" />
          </div>
          <div style="clear: both">
          </div>
          <div style="float: left; margin-left: 0px; margin-top: 5px">
            <div class="divLabel" style="margin-bottom: 5px">
              设备开始日期</div>
            <input id="txtResStartDate" name="resStartDate" type="text" class="easyui-datetimebox"
              style="height: 20px; width: 170px" required="required" data-options="editable:false" />
          </div>
          <div style="float: left; margin-left: 10px; margin-top: 5px">
            <div class="divLabel" style="margin-bottom: 5px">
              设备结束日期</div>
            <input id="txtResEndDate" name="resEndDate" type="text" class="easyui-datetimebox"
              style="height: 20px; width: 170px" required="required" data-options="editable:false" />
          </div>
          <div style="clear: both">
          </div>
          <div id="divApsPlanQty" style="float: left; margin-left: 0px; margin-top: 5px">
            <div class="divLabel" style="margin-bottom: 5px">
              排产数</div>
            <input id="txtApsPlanQty" name="apsPlanQty" type="text" class="easyui-numberbox"
              style="height: 20px; width: 80px" />
          </div>
        </div>
        <div style="float: left; margin-left: 10px; width: 300px">
          <div class="divLabel" style="margin-bottom: 5px;">
            设备：</div>
          <select id="ddlResource" name="resourceId" class="easyui-combobox" style="width:100%"
            data-options="editable:false,height:20" required="required">
          </select>
          <div class="divLabel" style="margin-bottom: 5px">
            加工人员</div>
          <table id="gdMakeEmployee" class="easyui-datagrid" style="width: 100%; height: 150px"
            data-options="rownumbers:true,pagination:false,striped:true,checkOnSelect:true,selectOnCheck:true,singleSelect:false,pageNumber:1,pageSize:5,pageList:[5,10,20]">
          </table>
        </div>
        <div style="clear: both">
        </div>
      </div>
      <div style="float: left;margin-left:3px">
        <button id="btnSave" class="easyui-linkbutton" type="button" style="width: 100px;
                height: 26px">
          保存</button>
        <button id="btnClose" class="easyui-linkbutton" type="button" style="width: 60px;
                height: 26px">
          关闭</button>
      </div>
      <div style="clear: both">
      </div>
      <div id="showDialogMsg" style="margin:5px 0px 0px 3px">
      </div>
    </form>
  </div>

  <div id="dgLog" title="下发/回收审批信息" style="width: 1050px; height: 380px; display: none;
        top: 300px" data-options="iconCls:'icon-save',resizable:true">
         <table id="dgLogTable" class="easyui-datagrid" style="width: 100%; height: 340px;"
              data-options="fitColumns:true,rownumbers:true">
              <thead>
                <tr>
                    <th data-options="field:'CONTAINERNAME',width:130">批次号</th>
                    <th data-options="field:'WORKFLOWSTEPNAME',width:150">工序名称</th>
                    <th data-options="field:'QTY',width:90">在制数</th>
                    <th data-options="field:'STARTTIME',width:150">计划开始时间</th>
                    <th data-options="field:'FULLNAME',width:80,">操作人</th>
                    <th data-options="field:'CREATEDATE',width:150">操作时间</th>
                    <th data-options="field:'STATUS',width:100">操作流程</th>
                    <th data-options="field:'REASON',width:250">申请原因/审批意见</th>
                    <th data-options="field:'REMARK',width:150">备注</th>
                </tr>
            </thead>
          </table>
   </div>

   <div id="dgReason" title="下发/回收原因" style="width: 800px; height: 280px; display: none;
        top: 300px" data-options="iconCls:'icon-save',resizable:true">
          <form id="ReasonForm">
            <table>
                <tbody>
                    <tr >
                        <td style="text-align:right;padding:10px 0" class="divLabel">订单号：</td><td><input class="easyui-textbox" name="mfgordername" style="height: 20px; width: 170px" data-options="editable:false"/></td>
                        <td style="text-align:right;padding:10px 0" class="divLabel">批次号：</td><td><input class="easyui-textbox" name="containername" style="height: 20px; width: 170px" data-options="editable:false"/></td>
                        <td class="divLabel">计划开始时间：</td><td><input class="easyui-textbox" name="starttime" style="height: 20px; width: 170px" data-options="editable:false"/></td>
                    </tr>
                    <tr >
                        <td style="text-align:right;padding:10px 0" class="divLabel">零件名称：</td><td><input class="easyui-textbox" name="description" style="height: 20px; width: 170px" data-options="editable:false"/></td>
                        <td style="text-align:right;padding:10px 0" class="divLabel">工序名称：</td><td><input class="easyui-textbox" name="workflowstepname" style="height: 20px; width: 170px" data-options="editable:false"/></td>
                        <td class="divLabel">计划结束时间：</td><td><input class="easyui-textbox" name="endtime" style="height: 20px; width: 170px" data-options="editable:false"/></td>
                    </tr>
                    <tr >
                        <td style="text-align:right;padding:10px 0" class="divLabel">在制数：</td><td><input class="easyui-textbox" name="qty" style="height: 20px; width: 170px" data-options="editable:false"/></td>
                        <td style="text-align:right;padding:10px 0" class="divLabel">原因：</td><td><input class="easyui-combobox" id="reason" name="reason" style="height: 20px; width: 170px" data-options="editable:false"/></td>
                    </tr>
                    <tr>
                        <td style="text-align:right" class="divLabel">备注：</td><td colspan="5"><input class="easyui-textbox" id="remark" name="remark" style="width:670px;height: 20px;" /></td>
                    </tr>
                   
                </tbody>
            </table>
             <div style="margin-left:30px;padding-top:30px;">
                <a href="javascript:void(0)" class="easyui-linkbutton" onclick="page.submitForm()" style="width:80px">保存</a>
                <a href="javascript:void(0)" class="easyui-linkbutton" onclick="page.clearForm()" style="width:80px">关闭</a>
             </div>
          </form>
   </div>
</body>

</html>
<script src="/InSiteWebApplication/Scripts/CustomPageJs/ReferenceJsLib.js" type="text/javascript"></script>
<script src="/InSiteWebApplication/Content/Easyui/jquery.min.js" type="text/javascript"></script>
<script src="/InSiteWebApplication/Content/Easyui/jquery.easyui.min.js" type="text/javascript"></script>
<script src="/InSiteWebApplication/Content/Easyui/easyui-lang-zh_CN.js" type="text/javascript"></script>
<script src="/InSiteWebApplication/Scripts/CustomPageJs/CustomCommon.js" type="text/javascript"></script>
<script src="/InSiteWebApplication/Scripts/dayjs.min.js" type="text/javascript"></script>
<!--<script src="/InSiteWebApplication/Scripts/ApsJs/ApsPlanDownSendPage.js?V=new Date().getTime()" type="text/javascript"></script>-->
<script type="text/javascript">
  document.write('<script src="/InSiteWebApplication/Scripts/ApsJs/ApsPlanDownSendPage.js?v=' + new Date().getTime() + '" type="text/javascript" ><\/script>');
</script>